package com.yzy.fly.entity.jdk;

import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import com.google.common.collect.Lists;
import com.yzy.fly.kernel.model.FlyBasicModel;
import lombok.Data;

import java.util.List;

@Data
@TableName(value = "jdk_exception", autoResultMap = true)
public class JdkException extends FlyBasicModel<Integer,JdkException> {

    @TableId(type = IdType.AUTO)
    private Integer id;
    private String name;
    //实现接口
    @TableField(value = "allImplementedInterfaces",typeHandler = FastjsonTypeHandler.class)
    private JSONArray allImplementedInterfaces = new JSONArray(0);
    //已知直接子类
    @TableField(value = "directKnownSubclasses",typeHandler = FastjsonTypeHandler.class)
    private JSONArray directKnownSubclasses = new JSONArray(0);
    private String code;
    private String simpleDescription;
    private String description;
    private String html;
    private String since;
    private String sourceUrl;
    private String verison;
    @TableField(exist = false)
    private List<JdkField> fields = Lists.newArrayListWithCapacity(0);
    @TableField(exist = false)
    private List<JdkException> constructors = Lists.newArrayListWithCapacity(0);
    @TableField(exist = false)
    private List<JdkMethod> methods = Lists.newArrayListWithCapacity(0);
//    @ParentId("packageId")
    private Integer packageId;

}
